import 'package:flutter/material.dart';
import 'package:flutter_scaffold/drawer/drawer_demo.dart';
import 'package:flutter_scaffold/tabbar/tabbar_page.dart';
import 'package:flutter_scaffold/top_navigation/appbar_page.dart';
import 'package:flutter_scaffold/bottom_navigation/bottom_navigation_bar.dart';
import 'package:flutter_scaffold/router/router_page.dart';
import 'package:flutter_scaffold/router/unknown_router_page.dart';

import 'bottom_navigation/bottom_navigationbar_with_floatingbar.dart';

void main(List<String> args) => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      /// 关掉右上角的debug提示
      debugShowCheckedModeBanner: false,
      routes: {
        "home": (context) => HomePage([
              "bottom_navigation_page",
              "appbar_page",
              "bottom_navigation_bar_page",
              "tabbar_page",
              "drawer_page",
            ]),
        "bottom_navigation_page": (context) => FirstPage(),
        "appbar_page": (context) => SecondPage(),
        "bottom_navigation_bar_page": (context) => ThirdPage(),
        "tabbar_page": (context) => TabbarPage(),
        "drawer_page": (context) => DrawerDemo(),
      },
      initialRoute: "home",
      onUnknownRoute: (setting) =>
          MaterialPageRoute(builder: (context) => UnKnownRouter()),
    );
  }
}
